#ifndef __LNSTRING_H__
#define __LNSTRING_H__

/*
   useful MACROs
*/

#define  COUNT_OF(v)    (sizeof(v)/sizeof(v[0]))

/*
  string_hash
*/
unsigned  ln_string_hash (unsigned n, const char* s);

/*
   string_map
*/
struct string_map_t
{
  int id;
  const char* string;
};

typedef const struct string_map_t* string_map_p;

string_map_p
string_map_at (
    string_map_p map,
    string_map_p * cache,
    int cache_size,
    int id);

int
string_map_find (
    string_map_p map,
    string_map_p * cache,
    int cache_size,
    const char* s);

/*
  string_list
*/
void
string_list_delete (char** list, int count);

int
string_list_count (char** list);

#endif
